﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using SingleUserMall.Items;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static SingleUserMall.Dividends.Dividend;
using static SingleUserMall.Items.Item;

namespace SingleUserMall.Mall.VO
{
    /// <summary>
    /// 商品简单信息
    /// </summary>
    [AutoMapFrom(typeof(Item))]
    public class ItemMiniVO : EntityDto<long>
    {
        /// <summary>
        /// 对应果树所在地址
        /// </summary>
        public string TreeAddress { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 标签（,分隔）
        /// </summary>
        public string Tags { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        public string Picture { get; set; }
        /// <summary>
        /// 是否热门
        /// </summary>
        public bool IsHot { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 是否新品
        /// </summary>
        public bool IsNew => CreationTime.AddDays(SingleUserMallConsts.NewDays) > DateTime.Now;
        /// <summary>
        /// 最低原价（根据规格设定）
        /// </summary>
        public decimal OriginalPrice { get; set; }
        /// <summary>
        /// 最低价格（根据规格设定）
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 最低会员价格（根据规格设定）
        /// </summary>
        public decimal VipPrice { get; set; }
        /// <summary>
        /// 最低超级会员价格（根据规格设定）
        /// </summary>
        public decimal SuperVipPrice { get; set; }
        /// <summary>        
        /// 最低团购价格（根据规格设定）
        /// </summary>
        public decimal GroupPrice { get; set; }
        /// <summary>
        /// 发货地
        /// </summary>
        public string Shipments { get; set; }
        /// <summary>
        /// 图片（以,分割）
        /// </summary>
        public string Pictures { get; set; }
        /// <summary>
        /// 星级（根据评论计算得出）
        /// </summary>
        public double Star { get; set; }
        /// <summary>
        /// 月销量
        /// </summary>
        public int MonthSale { get; set; }
        /// <summary>
        /// 总销量
        /// </summary>
        public int TotalSale { get; set; }
        /// <summary>
        /// 团购标识
        /// </summary>
        public bool IsGroup { get; set; }
        /// <summary>
        /// 限时购价格（根据规格设定）
        /// </summary>
        public decimal LimitPrice { get; set; }
        /// <summary>
        /// 限时购标识
        /// </summary>
        public bool IsTimeLimit { get; set; }
        /// <summary>
        /// 限时购开始时间
        /// </summary>
        public DateTime? LimitBeginTime { get; set; }
        /// <summary>
        /// 限时购结束时间
        /// </summary>
        public DateTime? LimitEndTime { get; set; }
        /// <summary>
        /// 店铺id
        /// </summary>
        public int StoreId { get; set; }
        /// <summary>
        /// 虚拟销量可在后台设置
        /// </summary>
        public int VSaleCount { get; set; }
        /// <summary>
        /// 首页标签
        /// </summary>
        public string MainTags { get; set; }
        /// <summary>
        /// 砍价底价
        /// </summary>
        public decimal BargainPrice { get; set; }
        /// <summary>
        /// 需砍价次数
        /// </summary>
        public int BargainTimes { get; set; }
        /// <summary>
        /// 是否砍价
        /// </summary>
        public bool IsBargain { get; set; }
        /// <summary>
        /// 果树总数量
        /// </summary>
        public int? TreeTotalQty { get; set; }

        /// <summary>
        /// 果树剩余数量
        /// </summary>
        public int? TreeRemainingQty { get; set; }
        /// <summary>
        /// 分红期数
        /// </summary>
        public int? NumberPeriods { get; set; }
        /// <summary>
        /// 期限（月）
        /// </summary>
        public int? Timelimit { get; set; }

        /// <summary>
        /// 分红比例
        /// </summary>
        public decimal? DividendAmount { get; set; }

        /// <summary>
        /// 分红比例显示界面
        /// </summary>
        public string DividendAmountView { get; set; }
        /// <summary>
        /// 分红比例显示界面 年分红
        /// </summary>
        public string DividendAmountViewByYear { get; set; }
        /// <summary>
        /// 分红类型
        /// </summary>
        public DividendType? DividendTypes { get; set; }
        /// <summary>
        /// 商品类型
        /// </summary>
        public ItemsType? ItemType { get; set; }

        /// <summary>
        /// 分红商品状态 0：未开始分红，1：分红中 ，2：分红完成
        /// </summary>
        public DividendStatus? DividendItemStatus { get; set; }

        /// <summary>
        /// 零元购买人数
        /// </summary>
        public int? UserZeroBuyQty { get; set; }



    }
}
